<template>
  <div id="app">
    <router-view></router-view>
    <back-to-top
      class="backTop"
      :width="30"
      :height="30"
      background="#08dbdb"
      :visible-height="500"
      :speed="1000"
    >
    </back-to-top>
  </div>
</template>

<script>
import { mapMutations } from "vuex";

export default {
  data() {
    return {};
  },
  created() {
    //防止刷新后登录状态丢失
    this.initUser();
  },
  methods: {
    ...mapMutations(["initUser"]),
  },
};
</script>

<style lang="less" scoped>
#app {
  background-color: #fafafa;
}
div.backTop {
  bottom: 300px;
}
</style>
